package org.snail.constant;

/**
 * Created by WJ on 2017/11/14.
 */
public class WorkSheetConstant {

    public static final String NEXT_DAY = "次日";

    public static final String NEXT_DAY_TIME="24:00";
    public static final String OVERTIME_START = "08:00";
    public static final String SERIOUS_LATE = "10:00";
    public static final String NO_ATTENDENCE = "0";
    public static final Integer LUNCH_BREAK = 13;  //午休界点 用来判断有审批单的时候 打卡是否需要加上午休1小时时间

    public static final String YYYY_MM_DD_HH_MM = "yyyy-MM-dd HH:mm";
    public static final String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss";
    public static final String MM_DD_HH_MM = "MM-dd HH:mm";

    /**
     * ali 考勤表 班次类型 班次英文---shift
     */
    public static final String ORDER_FREE_TYPE = "休息";
    public static final String ORDER_AA1_TYPE = "AA 09:00-17:30";
    public static final String ORDER_AA2_TYPE = "AA 09:30-18:00";
    public static final String ORDER_D_TYPE = "D 09:30-18:00";
    public static final String ORDER_OTHER_TYPE = "9点班次";
    public static final String SHIFT_0900 = "9点班次 09:00-18:00";
    public static final String SHIFT_0930 = "9点半班次 09:30-18:30";
    public static final String SHIFT_C_0930 = "9点半班次C 09:30-18:00";
    public static final String SHIFT_AAAA = "AAAA 09:30-18:30 ";
    public static final String SHIFT_BJC_0900 = "bjc班次固定勿改 09:00-18:00";
    public static final String SHIFT_BJC_0930 = "bjc固定班次勿改 09:30-18:30";
    public static final String SHIFT_ECCOM = "Eccom 09:00-18:00";
    public static final String SHIFT_V = "V 10:00-19:00";

    /**
     * 关联审批单类型
     */
    public static final String[] APPROVAL_TYPE = {"调休","事假","年假","外出","婚假","加班","病假","其他"};
    public static final String APPROVAL_WORK_FREE_TYPE = "调休";
    public static final String APPROVAL_OVERTIME_FREE_TYPE = "事假";
    public static final String APPROVAL_YEAR_FREE_TYPE = "年假";
    public static final String APPROVAL_OUT_TYPE = "外出";
    public static final String APPROVAL_OUT_BUSSINESS = "外勤";

    public static final String APPROVAL_MARRIAGE_TYPE = "婚假";
    public static final String APPROVAL_OVERTIME_TYPE = "加班";
    public static final String APPROVAL_SICKLEAVE_TYPE = "病假";

    public static final String APPROVAL_OTHER_TYPE = "其他";
    public static final String SPLIT = "qqq&&&";

    /**
     * 上下班打卡结果：
     *     正常、迟到、严重迟到、早退、缺卡、补卡审批通过、请假、外出、外勤
     */
    public static final String CARD_RESULT_NORMAL= "正常";
    public static final String CARD_RESULT_LATE = "迟到";
    public static final String CARD_RESULT_SERIOUS_LATE = "严重迟到";
    public static final String CARD_RESULT_LEAVE_EARLY = "早退";
    public static final String CARD_MISS = "缺卡";
    public static final String CARD_APPROVAL = "补卡审批通过";
    public static final String CARD_OUT = "外出";
    public static final String CARD_OUT_ATTENDENCE = "外勤";
    public static final String CARD_LEAVE = "请假";
    public static final String CARD_BUSSINESS_TRIP = "出差";
    public static final String CARD_UNPREPARED = "未打卡";

    /**
     * 审批单中有哪些审批
     */
    public static final String APPROVAL_PRIVATE_AFFAIR_LEAVE = "事假";
    public static final String APPROVAL_WORK_OVERTIME = "加班";
    public static final String APPROVAL_PAID_LEAVE = "调休";
    public static final String APPROVAL_TO_GO_OUT = "外出";

    /**
     * 班次
     * 班次：正常、休息、不在考勤组,
     */
    public static final String ORDER_NORMAL = "班次";
    public static final String ORDER_REST = "休息";
    public static final String ORDER_OUT_OF_TEAM = "不在考勤组";
    public static final String ORDER_AAAA = "AAAA";
    public static final String ORDER_ECCOM = "Eccom";
    public static final String ORDER_NO_SCHEDULING = "未排班";  //未排班说明不在我们部门

    /**
     * 考勤异常所需的常量
     */
    public static final double WORK_HOUR= 480.0;     //每日工作时长算作480

    /**
     * 考勤信息明细类型
     */
    public static final String EXT_WORK_FREE_TYPE = "调休";
    public static final String EXT_OVERTIME_TYPE = "其他";
    public static final String EXT_WEEKEND_OVERTIME_TYPE = "非工作日加班";
    public static final String EXT_WEEKDAY_OVERTIME_TYPE = "工作日加班";
    public static final String EXT_EXCEPTION_TYPE = "异常考勤";

    /**
     * 考勤异常数据
     *   6:"微信事假未申请"
     *   1:"上班忘记打卡",
         2:"下班忘记打卡",
         3:"严重迟到",
         4:"工作时长小于8小时",
         5:"调休+上班时间小于8小时",
         12:"上下班均未打卡"
         13:"调休或请假后上下班未打卡"
     */
    public static final Integer ABNORMAL_RESULT_MISS_DAY = 1;
    public static final Integer ABNORMAL_RESULT_MISS_NIGHT = 2;
    public static final Integer ABNORMAL_RESULT_MISS_BOTH = 12;
    public static final Integer ABNORMAL_RESULT_SERIOUS_LATE = 3;
    public static final Integer ABNORMAL_RESULT_UNDER9 = 4;
    public static final Integer ABNORMAL_RESULT_SPECIAL_UNDER9 = 5;
    public static final Integer ABNORMAL_FORGET_LEAVE = 6;

    /**
     * 考勤异常原因
     */
    public static final String ATTENDENCE_MISS_REASON = "缺卡";
    public static final String ATTENDENCE_LATE_REASON = "严重迟到";
    public static final String ATTENDENCE_WORK_UNDER9 = "工作时长小于8小时";
    public static final String WX_LEAVE_MISS_REASON = "微信未申请事假";


    /**
     * 微信端请假模块可能需要用到的功能
     */
    public static final String WX_OUT = "外出";
    public static final String WX_OVERTIME = "加班";
    public static final String WX_DAYOFFs = "调休";
    public static final String WX_OUTWORK = "外勤";
    public static final String WX_YEAR = "年假";
    public static final String NEXTDAY = "次日";


    /**
     * 是否被标记为正常数据
     * 默认为0，表示没有被标记的数据；1表示强行标记的数据；2.表示全部数据
     */
    public static final int FLAG_CORRECT = 1;
    public static final int FLAG_NORMAL = 0;
    public static final int FLAG_ALL = 2;


    /**
     * 判断请假类型是加班还是请假
     *    请假是1；加班是2
     */
    public static final int LEAVE_TYPE = 1;
    public static final int OVERTIME_TYPE = 2;

    /**
     * 截取表格中的固定字符串
     */
    /**
     * 需要截取关联审批单中 获取日期"03-19"  实例：加班03-19 18:26到03-20 03:29 9.04小时，获取日期"03-19"
     */
    public static final int SUBSTR_DATESTR_DAY_START_INDEX = 2;
    public static final int SUBSTR_DATESTR_DAY_END_INDEX = 7;

    /**
     * 需要截取关联审批单中 获取日期"03-19"  实例：18:26到03-20 03:29 9.04小时，获取日期"18:26"
     */
    public static final int SUBSTR_DATESTR_BEGIN = 0;
    public static final int SUBSTR_DATESTR_END = 5;

    /**
     * 考勤异常字段处理
     *
     *   public static final String APPROVAL_PRIVATE_AFFAIR_LEAVE = "事假";
         public static final String APPROVAL_WORK_OVERTIME = "加班";
         public static final String APPROVAL_PAID_LEAVE = "调休";
         public static final String APPROVAL_TO_GO_OUT = "外出";
     */
    public static final int ABNORMAL_TYPE_MISS_PUNCH = 1;        //上班时间未打卡
    public static final int ABNORMAL_TYPE_MISS_PUNCH2=2;         //下班时间未打卡
    public static final int ABNORMAL_TYPE_LATE_ARRIVAL = 3;      //上班严重迟到
    public static final int ABNORMAL_TYPE_BELOW_9 = 4;           //工作时长未满足九小时
    public static final int ABNORMAL_TYPE_APPROVAL_BELOW_9 = 5; //调休加上上班时间小于8小时;
    public static final int ABNORMAL_TYPE_OVERTIME_APPROVAL = 6;//周末加班时长与审批单不符
    public static final int ABNORMAL_TYPE_WORK_OVERTIME = 7;    //加班加上上班时间小于8小时
    public static final int ABNORMAL_TYPE_AFFAIR_LEAVE = 8;     //事假加上上班时间小于8小时
    public static final int ABNORMAL_TYPE_TO_GO_OUT = 9;        //外出审批异常
    public static final int ABNORMAL_TYPE_MISS_PUNCH_PUNCH2=12; //上下班均未打卡

    /**
     *
     */
    public static final String REMOVE_HOUR = "小时";   //上班严重迟到

    /**
     * 异常考勤所需的相关字段
     */
    public static final int MISS_PUNCH = 1;   //缺卡
    public static final int OVER_WORK = 2;   //加班
    public static final int OFF_WORK = 4;   //请假
    public static final int APPROVAL = 8;   //调休

}
